package com.yanqu.road.server.cmd.player;

import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.player.GamePlayerMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;
import com.yanqu.road.server.command.Cmd;

@Cmd(code = Protocol.S_PLAYER_LOGOUT, desc = "玩家退出游戏")
public class LogoutGameCmd extends AbstractCommand {

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
		GamePlayerMgr.onLogout(player,false);
	}

	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void sendData(GamePlayer player) {

	}

}
